<template>
  <div class="backBar">
    <Tooltip class="item" effect="dark" content="返回" placement="right">
      <GoBack @click="goBack"></GoBack>
    </Tooltip>
    <slot></slot>
  </div>
</template>
<script setup>
import { Tooltip } from '@opentiny/vue'
import { IconArrowLeft } from '@opentiny/vue-icon'
import { useRouter } from 'vue-router'
const router = useRouter()
const GoBack = IconArrowLeft()
const goBack = () => {
  router.go(-1)
}
</script>
<style lang="scss" scoped>
  .backBar {
    background-color: white;
    svg {
      width: 2em;
      height: 1.3em;
      fill: #5e7ce0;
      cursor: pointer;
      margin-left: 5px;
      margin-bottom: 2px;
    }
  }
</style>  